<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>网站后台管理</title>
<link href="__PUBLIC__/Admin/images/Admin_css.css" type="text/css" rel="stylesheet">
<link rel="shortcut icon" href="__PUBLIC__/Admin/images/myfav.ico" type="image/x-icon" />
<import file= "Admin.js.admin,Admin.js.Ajax,Admin.js.Jquery"/> 
<script charset="utf-8" src="__PUBLIC__/Common/artDialog/jquery.artDialog.js?skin=simple"></script>
<script charset="utf-8" src="__PUBLIC__/Common/artDialog/extend.js"></script>
<script charset="utf-8" src="__PUBLIC__/Common/artDialog/plugins/iframeTools.js"></script>
<script>
function jconfirm(id,str,url)
{
   $.dialog.confirm(str,function (){
    art.dialog.tips('请勿关闭浏览器,系统正在执行删除操作...',60);
   $.post(url, function(data){
     art.dialog.tips('成功删除指定内容',2);
	 $('#'+id).fadeOut("slow");
 });
   });
}
function jopen(url)
{
	art.dialog.open(url,
    {title: '文件上传组件', width: 300, height: 300});
}
</script>
</head>
<body>
<table width="95%" border="0"  align="center" cellpadding="3" cellspacing="2" bgcolor="#FFFFFF" class="admintable">
<tr> 
  <td colspan="6" align="left" class="admintitle"><span style="float:right;"><a href="{:curPageURL()}">[刷新]</a>&nbsp;<a href="javascript:;" onclick='history.go(-1)'>[返回]</a></span>文件管理器</td>
</tr>
    <tr bgcolor="#f1f3f5" style="font-weight:bold;">
    <td width="20%" align="center" class="ButtonList">文件夹/文件名</td>
	<td width="20%" align="center" class="ButtonList">文件类型</td>
	<td width="10%" align="center" class="ButtonList">文件权限</td>
	<td width="10%" align="center" class="ButtonList">文件大小</td>
	<td width="20%" align="center" class="ButtonList">修改时间</td>
	<td width="20%" align="center" class="ButtonList">相关操作</td>
    </tr>
  <tr bgcolor="#f1f3f5" style="font-weight:bold;">
  <td colspan="5" align="left"><notempty name='Think.get.dir'><img src="__PUBLIC__/Admin/images/file/last.gif"> <a href="{:U('FileManage/index?dir=')}{:urlencode($lastdir)}">上级目录</a></notempty> 当前目录:<notempty name='Think.get.dir'>{:urldecode($_GET['dir'])}<else/>根目录</notempty>&nbsp;&nbsp;<a href="{:U('FileManage/zip?dir=')}{:urldecode($_GET['dir'])}">打包当前目录</a>&nbsp;&nbsp;<a href="javascript:;" onclick="jopen('{:U('FileManage/upload?dir=')}{:urldecode($_GET['dir'])}')">上传文件到此目录</a> </td>
  <td><a href="{:U('FileManage/add?type=file&dir=')}{:urlencode($_GET['dir'])}" target='_blank'>新建文档</a>|<a href="{:U('FileManage/add?type=dir&dir=')}{:urlencode($_GET['dir'])}" target='_blank'>新建文件夹</a></td>
  </tr>
<volist name="list" id="vo">
  <eq name="vo.type" value="dir">
  <tr id="file_{$i}">
  	<td align='left'><img src="__PUBLIC__/Admin/images/file/folder.gif" width="16" height="16"><a href="{:U('FileManage/index?dir=')}{$vo.nowdir}"> {$vo.filename}</a></td>
    <td>文件夹</td>
    <td>
	<if condition='$vo.is_readable==true'><font color='green'>可读</font><else/><font color='red'>不可读</font></if>
	<if condition='$vo.is_writeable==true'><font color='green'>可写</font><else/><font color='red'>不可写</font></if>
	</td>
    <td>{$vo.filesize|byte_format=###}</td>
    <td>{$vo.mtime|getcolordate='Y-m-d H:i:s',###}</td>
    <td><a href="{:U('FileManage/getdown?dir=')}{$vo.nowdir}" target="_blank">下载</a>&nbsp;&nbsp;<a href="{:U('FileManage/index?dir=')}{$vo.nowdir}">浏览</a>&nbsp;&nbsp;<a href="{:U('FileManage/rename?dir=')}{$vo.nowdir}">重命名</a>&nbsp;&nbsp;<a href='javascript:' onclick="jconfirm('file_{$i}','确定删除文件夹{$vo.filename}?','{:U('FileManage/del?dir=')}{$vo.nowdir}')" >删除</a></td>
  </tr>
  <else />
  <tr id="file_{$i}">
  	<in name="vo.ext" value="jpg,gif,js,css,html,htm,php">
    <td align='left'><img src="__PUBLIC__/Admin/images/file/{$vo.ext}.gif" width="16" height="16"> {$vo.filename}</td>
    <else/>
	<in name="vo.ext" value="zip,rar,doc,ppt,png,txt,xls,pdf">
    <td align='left'><img src="__PUBLIC__/Editor/kindeditor/mini/{$vo.ext}.gif" width="16" height="16"> {$vo.filename}</td>
    <else/>
	<td align='left'><img src="__PUBLIC__/Admin/images/file/other.gif" width="16" height="16"> {$vo.filename}</td>
	</in>
	</in>
    <td>{$vo.filename|gettplname=###}</td>
	<td>
	<if condition='$vo.is_readable==true'><font color='green'>可读</font><else/><font color='red'>不可读</font></if>
	<if condition='$vo.is_writeable==true'><font color='green'>可写</font><else/><font color='red'>不可写</font></if>
	</td>
    <td>{$vo.filesize|byte_format=###}</td>
    <td>{$vo.mtime|getcolordate='Y-m-d H:i:s',###}</td>
	 <php>if(ereg("\.zip",$vo['filename'])){</php>
    <td><a href="{:U('FileManage/getdown?dir=')}{$vo.nowdir}" target="_blank">下载</a>&nbsp;&nbsp;<a href="{:U('FileManage/unzip?dir=')}{$vo.nowdir}">解压</a>&nbsp;&nbsp;<a href="{:U('FileManage/rename?dir=')}{$vo.nowdir}">重命名</a>&nbsp;&nbsp;<a href="javascript:;" onclick="jconfirm('file_{$i}','确定删除文件{$vo.filename}?','{:U('FileManage/del?dir=')}{$vo.nowdir}')">删除</a></td>
    <php>}elseif(ereg("\.html|\.htm|\.txt|\.css|\.php|\.js|\.xml",$vo['filename'])){</php>
    <td><a href="{:U('FileManage/getdown?dir=')}{$vo.nowdir}" target="_blank">下载</a>&nbsp;&nbsp;<a href="{:U('FileManage/edit?dir=')}{$vo.nowdir}">编辑</a>&nbsp;&nbsp;<a href="{:U('FileManage/rename?dir=')}{$vo.nowdir}">重命名</a>&nbsp;&nbsp;<a href="javascript:;" onclick="jconfirm('file_{$i}','确定删除文件{$vo.filename}?','{:U('FileManage/del?dir=')}{$vo.nowdir}')">删除</a></td>
    <php>}else{</php>
    <td><a href="{:U('FileManage/getdown?dir=')}{$vo.nowdir}" target="_blank">下载</a>&nbsp;&nbsp;<a href="__ROOT__{:urldecode($_GET['dir'])}/{$vo.filename}" target='_blank'>浏览</a>&nbsp;&nbsp;<a href="{:U('FileManage/rename?dir=')}{$vo.nowdir}">重命名</a>&nbsp;&nbsp;<a href="javascript:;" onclick="jconfirm('file_{$i}','确定文件删除{$vo.filename}?','{:U('FileManage/del?dir=')}{$vo.nowdir}')">删除</a></td>
    <php>}</php>
  </tr>
  </eq>  
  </volist>
</table>
</form>
<div style="text-align:center;margin:10px;">
<hr>
<include file="Index:copy" /> 
</div>
</body>
</html>